#coding=utf-8
import rospy
from turtlesim.srv import SetPen,SetPenRequest,SetPenResponse
set_color=rospy.ServiceProxy("/turtle1/set_pen",SetPen)
set_color.wait_for_service()
print("connected")
while not rospy.is_shutdown():
    pen_data=SetPenRequest()
    pen_data2=SetPenRequest
    for i in range(255):
        for j in range(255):
            for k in range(255):
                pen_data.r=i
                pen_data.g=j
                pen_data.b=k
                pen_data.width=5
                set_color.call(pen_data)
